import request from '@/utils/request'

// 获取实时天气
export function weatherInfo(query) {
  return request({
    url: '/weather/search',
    method: 'get',
    params: query
  })
}

//获取预警信息
export function warnIngInfo(query) {
  return request({
    url:'/sale/search',
    method: 'get',
    params: query
  })
}

//获取7日天气信息
export function weatherInfoForSeenDay(query){
  return request({
    url:'/weather/search7d',
    method:'get',
    params: query
  })
}
// '/weather/search24h'
//获取24小时天气信息
export function weatherInfoForTreeHons(query){
  return request({
    url:'/weather/search24h',
    method:'get',
    params: query
  })
}

//获取预警信息(新)
export function warningInfoNew(query){
  return request({
    url:'/weather/searchWarningInfo',
    method: 'get',
    params: query
  })
}

//获取站点天气信息
export function newWarningInfo(query){
  return request({
    url:'/site/weather/search',
    method: 'post',
    data: query
  })
}

//获取站点天气数据（新）
export function newWarningInfoData(query){
  return request({
    url:'/site/weather/async/search',
    method: 'post',
    data:query
  })
}

//获取站点信息
export function getWeatherSearch(){
  return request({
    url:'/site/weather/site/search',
    method:'get'
  })
}

//获取空气质量信息
export function getAirQualityData(query){
  return request({
    url:'/weather/search/air/quality',
    method:'get',
    params:query
  })
}
